<style lang="scss" src="./index.scss" scoped></style>
<template>
    <div class="send-range-box" @click="handleClick">
        <slot></slot>
    </div>
</template>

<script lang="ts">
import { Component, Vue, Model } from "vue-property-decorator";
import { dialogForm } from "./form";

@Component
export default class SendRange extends Vue {
    @Model("change", {
        type: Array,
        default: () => {
            return [];
        }
    })
    readonly select!: any | any[];

    handleClick() {
        dialogForm({
            ids: this.select,
            sure: (vm: any, model: any) => {
                vm.close();
                this.$emit("change", model.select);
            }
        });
    }
}
</script>
